Integrand size = 28, antiderivative size = 115 \[ \int \frac {(a+i a \tan (e+f x))^3}{c+d \tan (e+f x)} \, dx=\frac {4 a^3 x}{c-i d}-\frac {a^3 (i c-3 d) \log (\cos (e+f x))}{d^2 f}-\frac {a^3 (c+i d)^2 \log (c \cos (e+f x)+d \sin (e+f x))}{d^2 (i c+d) f}-\frac {a^3+i a^3 \tan (e+f x)}{d f} \]
[Out]
Time = 0.41 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3637, 3670, 3556, 3612, 3611} \[ \int \frac {(a+i a \tan (e+f x))^3}{c+d \tan (e+f x)} \, dx=-\frac {a^3 (-3 d+i c) \log (\cos (e+f x))}{d^2 f}-\frac {a^3 (c+i d)^2 \log (c \cos (e+f x)+d \sin (e+f x))}{d^2 f (d+i c)}+\frac {4 a^3 x}{c-i d}-\frac {a^3+i a^3 \tan (e+f x)}{d f} \]
[In]
[Out]
Rule 3556
Rule 3611
Rule 3612
Rule 3637
Rule 3670
Rubi steps \begin{align*} \text {integral}& = -\frac {a^3+i a^3 \tan (e+f x)}{d f}+\frac {a \int \frac {(a+i a \tan (e+f x)) (a (i c+d)+a (c+3 i d) \tan (e+f x))}{c+d \tan (e+f x)} \, dx}{d} \\ & = -\frac {a^3+i a^3 \tan (e+f x)}{d f}+\frac {a \int \frac {a^2 d (i c+d)-a^2 \left (i c^2-3 c d-4 i d^2\right ) \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{d^2}+\frac {\left (a^3 (i c-3 d)\right ) \int \tan (e+f x) \, dx}{d^2} \\ & = \frac {4 a^3 x}{c-i d}-\frac {a^3 (i c-3 d) \log (\cos (e+f x))}{d^2 f}-\frac {a^3+i a^3 \tan (e+f x)}{d f}-\frac {\left (a^3 (c+i d)^2\right ) \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{d^2 (i c+d)} \\ & = \frac {4 a^3 x}{c-i d}-\frac {a^3 (i c-3 d) \log (\cos (e+f x))}{d^2 f}-\frac {a^3 (c+i d)^2 \log (c \cos (e+f x)+d \sin (e+f x))}{d^2 (i c+d) f}-\frac {a^3+i a^3 \tan (e+f x)}{d f} \\ \end{align*}
Time = 1.42 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.95 \[ \int \frac {(a+i a \tan (e+f x))^3}{c+d \tan (e+f x)} \, dx=-\frac {a^3 \left (-d^2+8 d^2 \log (i+\tan (e+f x))+2 c^2 \log (c+d \tan (e+f x))+4 i c d \log (c+d \tan (e+f x))-2 d^2 \log (c+d \tan (e+f x))-2 (c-i d) d \tan (e+f x)\right )}{2 d^2 (i c+d) f} \]
[In]
[Out]
Time = 0.40 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.93
method | result | size |
norman | \(\frac {4 a^{3} x}{-i d +c}-\frac {i a^{3} \tan \left (f x +e \right )}{d f}+\frac {i a^{3} \left (2 i c d +c^{2}-d^{2}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{d^{2} f \left (-i d +c \right )}+\frac {2 i a^{3} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{f \left (-i d +c \right )}\) | \(107\) |
derivativedivides | \(\frac {a^{3} \left (-\frac {i \tan \left (f x +e \right )}{d}+\frac {\left (i c^{3}-3 i c \,d^{2}-3 c^{2} d +d^{3}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{d^{2} \left (c^{2}+d^{2}\right )}+\frac {\frac {\left (4 i c -4 d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (4 i d +4 c \right ) \arctan \left (\tan \left (f x +e \right )\right )}{c^{2}+d^{2}}\right )}{f}\) | \(116\) |
default | \(\frac {a^{3} \left (-\frac {i \tan \left (f x +e \right )}{d}+\frac {\left (i c^{3}-3 i c \,d^{2}-3 c^{2} d +d^{3}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{d^{2} \left (c^{2}+d^{2}\right )}+\frac {\frac {\left (4 i c -4 d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (4 i d +4 c \right ) \arctan \left (\tan \left (f x +e \right )\right )}{c^{2}+d^{2}}\right )}{f}\) | \(116\) |
parallelrisch | \(\frac {4 i x \,a^{3} d^{3} f +2 i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a^{3} c \,d^{2}+i \ln \left (c +d \tan \left (f x +e \right )\right ) a^{3} c^{3}-3 i \ln \left (c +d \tan \left (f x +e \right )\right ) a^{3} c \,d^{2}-i \tan \left (f x +e \right ) a^{3} c^{2} d -i \tan \left (f x +e \right ) a^{3} d^{3}+4 x \,a^{3} c \,d^{2} f -2 \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a^{3} d^{3}-3 \ln \left (c +d \tan \left (f x +e \right )\right ) a^{3} c^{2} d +\ln \left (c +d \tan \left (f x +e \right )\right ) a^{3} d^{3}}{d^{2} f \left (c^{2}+d^{2}\right )}\) | \(190\) |
risch | \(-\frac {8 a^{3} x}{i d -c}-\frac {6 i a^{3} x}{d}-\frac {i a^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) c}{d^{2} f}-\frac {2 a^{3} c x}{d^{2}}-\frac {2 a^{3} c e}{d^{2} f}-\frac {4 a^{3} c x}{d \left (i c +d \right )}-\frac {4 a^{3} c e}{d f \left (i c +d \right )}+\frac {2 i a^{3} c^{2} e}{d^{2} f \left (i c +d \right )}-\frac {2 i a^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right ) c}{d f \left (i c +d \right )}-\frac {2 i a^{3} e}{f \left (i c +d \right )}+\frac {2 i a^{3} c^{2} x}{d^{2} \left (i c +d \right )}+\frac {2 a^{3}}{f d \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}+\frac {3 a^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{d f}-\frac {2 i a^{3} x}{i c +d}-\frac {6 i a^{3} e}{d f}-\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right ) c^{2}}{d^{2} f \left (i c +d \right )}+\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right )}{f \left (i c +d \right )}\) | \(398\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.83 \[ \int \frac {(a+i a \tan (e+f x))^3}{c+d \tan (e+f x)} \, dx=\frac {2 i \, a^{3} c d + 2 \, a^{3} d^{2} - {\left (a^{3} c^{2} + 2 i \, a^{3} c d - a^{3} d^{2} + {\left (a^{3} c^{2} + 2 i \, a^{3} c d - a^{3} d^{2}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \log \left (\frac {{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right ) + {\left (a^{3} c^{2} + 2 i \, a^{3} c d + 3 \, a^{3} d^{2} + {\left (a^{3} c^{2} + 2 i \, a^{3} c d + 3 \, a^{3} d^{2}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{{\left (i \, c d^{2} + d^{3}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (i \, c d^{2} + d^{3}\right )} f} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 257 vs. \(2 (94) = 188\).
Time = 8.69 (sec) , antiderivative size = 257, normalized size of antiderivative = 2.23 \[ \int \frac {(a+i a \tan (e+f x))^3}{c+d \tan (e+f x)} \, dx=\frac {2 a^{3}}{d f e^{2 i e} e^{2 i f x} + d f} - \frac {i a^{3} \left (c + 3 i d\right ) \log {\left (e^{2 i f x} + \frac {a^{3} c^{2} + 3 i a^{3} c d - 2 a^{3} d^{2} - i a^{3} d \left (c + 3 i d\right )}{a^{3} c^{2} e^{2 i e} + 2 i a^{3} c d e^{2 i e} + a^{3} d^{2} e^{2 i e}} \right )}}{d^{2} f} + \frac {i a^{3} \left (c + i d\right )^{2} \log {\left (e^{2 i f x} + \frac {a^{3} c^{2} + 3 i a^{3} c d - 2 a^{3} d^{2} + \frac {i a^{3} d \left (c + i d\right )^{2}}{c - i d}}{a^{3} c^{2} e^{2 i e} + 2 i a^{3} c d e^{2 i e} + a^{3} d^{2} e^{2 i e}} \right )}}{d^{2} f \left (c - i d\right )} \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.22 \[ \int \frac {(a+i a \tan (e+f x))^3}{c+d \tan (e+f x)} \, dx=\frac {-\frac {i \, a^{3} \tan \left (f x + e\right )}{d} + \frac {4 \, {\left (a^{3} c + i \, a^{3} d\right )} {\left (f x + e\right )}}{c^{2} + d^{2}} + \frac {{\left (i \, a^{3} c^{3} - 3 \, a^{3} c^{2} d - 3 i \, a^{3} c d^{2} + a^{3} d^{3}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{c^{2} d^{2} + d^{4}} - \frac {2 \, {\left (-i \, a^{3} c + a^{3} d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{2} + d^{2}}}{f} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (106) = 212\).
Time = 0.49 (sec) , antiderivative size = 238, normalized size of antiderivative = 2.07 \[ \int \frac {(a+i a \tan (e+f x))^3}{c+d \tan (e+f x)} \, dx=-\frac {-\frac {8 i \, a^{3} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c - i \, d} + \frac {{\left (-i \, a^{3} c^{2} + 2 \, a^{3} c d + i \, a^{3} d^{2}\right )} \log \left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - c\right )}{c d^{2} - i \, d^{3}} - \frac {{\left (-i \, a^{3} c + 3 \, a^{3} d\right )} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{d^{2}} + \frac {{\left (i \, a^{3} c - 3 \, a^{3} d\right )} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{d^{2}} + \frac {-i \, a^{3} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, a^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 i \, a^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i \, a^{3} c - 3 \, a^{3} d}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )} d^{2}}}{f} \]
[In]
[Out]
Time = 7.65 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.86 \[ \int \frac {(a+i a \tan (e+f x))^3}{c+d \tan (e+f x)} \, dx=\frac {a^3\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,4{}\mathrm {i}}{f\,\left (c-d\,1{}\mathrm {i}\right )}-\frac {a^3\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}{d\,f}-\frac {\ln \left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (-a^3\,c^2\,1{}\mathrm {i}+2\,a^3\,c\,d+a^3\,d^2\,1{}\mathrm {i}\right )}{d^2\,f\,\left (c-d\,1{}\mathrm {i}\right )} \]
[In]
[Out]